1. Field of the Disclosure
The present disclosure relates to network communication, and more particularly to management of communication flow between electronic devices.
2. Description of the Related Art
In network communication, such as communication between peers in a peer-to-peer network, an application at a source communication node sends messages to a destination node via a network layer. In one configuration, the application provides each message to a transport layer, which parses each message into a set of packets, and provides the packets to the network layer for communication to the destination node. The transport layer thus provides a layer of abstraction for the application, so that the application does not have to manage packet communications with the destination node.
However, the transport layer typically has a limited number of resources, such as memory resources, to prepare and communicate packets. This can become problematic when the messages are provided by the application much more quickly than packets can be reliably communicated by the transport layer. For example, if the transport layer is implementing an ordered communication protocol, such as TCP/IP, the transport layer typically stores a transmitted packet in a queue until an acknowledgement is received from the destination node indicating that the packet has been properly received at the destination node, thereby allowing the transport layer to retire the packet from the queue. The queue is typically limited in size, so that if the application provides messages such that packets cannot be retired quickly enough, a bottleneck can result, causing loss of packets or other communication problems. The bottleneck problem can be addressed by having the application set the rate of communications of messages at a fixed rate that is known to avoid bottleneck of the queue. However, this can result in underutilization of resources at the transport layer.